/* 
 * Author: anand
 * 
 */
#include "application.h"

KeyMapValue::KeyMapValue()
	{
       _items = new std::map<int,std::string>;
	   (*_items)[PAUSE] = "Pause Playback";
	   (*_items)[PLAY] = "Play Music";
	   (*_items)[VOLUME_UP] = "Increase Volume";
	   (*_items)[VOLUME_DOWN] = "Reduce Volume";
	   (*_items)[MUTE] = "Mute Volume";
	   (*_items)[QUIT] = "Quit MiniPlayer";
	   (*_items)[SHOW_PLAYLIST] = "Show Current Playlist";
	   (*_items)[SHOW_FUNCTIONS] = "Shows Keyboard shortcuts";
	   (*_items)[PLIST_DELETE] = "Delete From Playlist";
	   (*_items)[FSYS_DELETE] = "Delete Permanently";
	   (*_items)[NEXT] = "Play Next Item";
	   (*_items)[PREV] = "Play Previous Item";

	}


void application::populate_defaults()
	{
		_keyMap['*'] = KeyMapValue::VOLUME_UP;
		_keyMap['/'] = KeyMapValue::VOLUME_DOWN;
		_keyMap['q'] = KeyMapValue::QUIT;
		_keyMap['Q'] = KeyMapValue::QUIT;
		_keyMap[3] = KeyMapValue::QUIT; //cntrl -c 
		_keyMap[' '] = KeyMapValue::PAUSE;  
		_keyMap['m'] = KeyMapValue::MUTE;
		_keyMap['M'] = KeyMapValue::MUTE;
		_keyMap['p'] = KeyMapValue::SHOW_PLAYLIST;
		_keyMap['P'] = KeyMapValue::SHOW_PLAYLIST;
		_keyMap['H'] = KeyMapValue::SHOW_FUNCTIONS;
		_keyMap['h'] = KeyMapValue::SHOW_FUNCTIONS;
		_keyMap['d'] = KeyMapValue::PLIST_DELETE;
		_keyMap['D'] = KeyMapValue::PLIST_DELETE;
		_keyMap['r'] = KeyMapValue::FSYS_DELETE;
		_keyMap['R'] = KeyMapValue::FSYS_DELETE;
		_keyMap['b'] = KeyMapValue::NEXT ;
		_keyMap['B'] = KeyMapValue::NEXT;
		_keyMap['z'] = KeyMapValue::PREV;
        _keyMap['Z'] = KeyMapValue::PREV;
	}
